<template>
  <div id="app">
   <router-view v-if="isRouterAlive" />
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
    return {
      isRouterAlive: true
    }
  },
   provide () {
    return {
      reload: this.reload
    }
  },
  mounted() {
    //清楚
    localStorage.removeItem('hisTabs')
  },
  methods:{
    reload () {
      this.isRouterAlive = false
      this.$nextTick(() => (this.isRouterAlive = true))
    }
  }
}
</script>
<style lang="scss">

</style>
